package edu.gatech.asthma.ui_support;

import edu.gatech.asthma.R;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;

/**
 * UI support for the emergency contact menu
 * Set menu items and inflate
 */
public class ContactMenu {

	public static boolean setUpContactMenu(Menu menu, Activity context) {
		SubMenu sub = menu.addSubMenu(context.getString(R.string.contact_menu_options));
		sub.getItem().setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
		context.getMenuInflater().inflate(R.menu.contact, sub);
		return true;
	}

}
